The gnome-software runs for a logged-in user, in the D-Bus session bus.
Running it for the 'gdm' user can be wrong both for user privileges,
and because the 'gdm' user does not have a home directory, thus
the gnome-software needs to cache everything from scratch, which
takes time and resources, delaying the open of the Reboot/Power Off
confirmation dialog.
Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/work_items/9040
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4376>
(cherry picked from commit
6356944ea47ef8dbdf49a89561ef1b463dc5c3e3)
import * as Dialog from './dialog.js';
import * as GnomeSession from '../misc/gnomeSession.js';
import * as LoginManager from '../misc/loginManager.js';
+import * as Main from './main.js';
import * as ModalDialog from './modalDialog.js';
import * as UserWidget from './userWidget.js';
if (this._softwareOfflineUpdatesProxy !== null)
return;
+ if (Main.sessionMode.isGreeter)
+ return;
+
try {
this._softwareOfflineUpdatesProxy = await SoftwareOfflineUpdatesProxy.newAsync(
Gio.DBus.session, 'org.gnome.Software', '/org/gnome/Software/OfflineUpdates');